<template>
        <div class="header">
          <div class="title">
              {{titleleft}}
          </div>
          <div class="seacher_add">
            <div class="seacher">
              <div>
              <a-input-search v-model="da" placeholder="请输入你需要搜索的关键字" style="width: 220px" />
              </div>
              <div style="margin-left:8px">
                <a-button style="background:rgb(231,231,231)" @click="search">
                开始搜索
            </a-button>
              </div>
            </div>
            <div class="add" v-if="true">
            <a-button v-if="btnshow" type="primary" @click="add">
              {{btnmsg}}
            </a-button>
            </div>
          </div>
        </div>
</template>
<script>

const data = [
  {
    key: '1',
    name: 'John Brown2',
    money: '￥3102,000.00',
    address: 'New York No. 1 Lake Park',
  },
  {
    key: '2',
    name: 'Jim Green2',
    money: '￥1,256,000.00',
    address: 'London No. 1 Lake Park',
  },
  {
    key: '3',
    name: 'Joe Black2',
    money: '￥120,000.00',
    address: 'Sidney No. 1 Lake Park',
  },
];

export default {
    props:{
    tableData:{
        value:[]
    },
      titleleft:'',
    btnmsg:'',
    btnshow:'',
    },
  data() {
    return {
    da:''
    };
  },methods:{
       search() {
       this.$emit("search",this.da)
       this.tableData.value=data
    },
      add(){
          this.$emit("add","iii")
      }
  }
};
</script>
<style lang="less" scoped>
/deep/.ant-table-tbody{
  background: #fff;
}
/deep/.ant-table.ant-table-bordered .ant-table-title{
  padding: 0;
}
.header {
  width: 100%;
  background: #fff;
  display: flex;
  padding:16px 16px;

  .title{
    flex: 1;
    font-size: 16px;
    color: black;
    font-weight: 500;
  }
  .seacher_add{
    display: flex;
    justify-content: space-around;
    flex: 1;
    .seacher{
      display: flex
    }

  }
}
th.column-money,
td.column-money {
  text-align: right !important;
}
</style>
